﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;

namespace DofusPlayer.Anm2
{
    class Anm
    {
        public static int CUSTOM_COLOR_NONE = 1;
        public static int CUSTOM_COLOR_SKIN = 1;
        public static int CUSTOM_COLOR_HAIR = 1;
        public static int CUSTOM_COLOR_SYMBOL_BG = 3;
        public static int CUSTOM_COLOR_SYMBOL_FG = 4;
        public static int CUSTOM_COLOR_SYMBOL_BORDER = 4;
        public static int CUSTOM_COLOR_1 = 6;
        public static int CUSTOM_COLOR_2 = 7;

        public enum State
        {
            none, loadStreaming, loadHeader, loadTextureInfo, loadShapeDefinition,
            loadSpriteDefinition, loadImports, loadActions, loadFrames, loadIndex,
            initCreateTextures, initWaitForTextures, ready
        }

        public AnmHeader m_header;
        public AnmTextureInfo[] m_texturesInfo;
        public Dictionary<int,AnmShapeDefinition> m_shapeDefinitionById;
        public AnmSpriteDefinition[] m_spritDefinitions;
        public Dictionary<int, AnmSpriteDefinition> m_spritDefinitionsbyId;
        public Dictionary<float, AnmSpriteDefinition> m_spritDefinitionsbyCRC;
        public Dictionary<float, AnmSpriteDefinition> m_spritDefinitionsbyBaseCRC;
        public Dictionary<int, AnmInport> m_importsById;
        public String[] m_actions;
        public AnmFrame[] m_frames;
        public AnmDefinitionRecord m_index;
        public String m_path;
        public String m_fileName;
        public State m_state;

        private int m_loadingIndex;
        private int m_numShapes;
        private int m_numImports;
        //private InputBitStream m_bitStream;
        //private AsyncURL m_asyncURL:
        private long m_pathCRC;
        //private static ASCIIEncoding m_classCRC = 
        //private static Logger m_logger 
        //private static CRC32 m_CRC

        public Anm()
        {
            m_header = new AnmHeader();
        }

        public void load(String fileName, bool async, bool flipAnimations)
        {

        }

        public void update(long availableTime)
        {

        }



    }
}
